//
//  QNJsbridge+Content.m
//  JSAPIModule
//
//  Created by sumeng on 2018/3/6.
//

#define QN_showToast @"showToast"
#define QN_showAlert @"showAlert"
#define QN_showConfirm @"showConfirm"

#import "QNJsbridge+Content.h"

@implementation QNJsbridge (Content)

/** 自动消失弹框*/
#pragma mark 自动消失弹框
- (void)registerShowToastResponseBlock:(QN_responseBlock)responseBlock {
    [self registerHandler:QN_showToast responseBlock:^(id data) {
        responseBlock(data);
    }];
}

#pragma mark 警告弹框
- (void)registerShowAlertResponseBlock:(QN_responseBlock)responseBlock {
    [self registerHandler:QN_showAlert responseBlock:^(id data) {
        responseBlock(data);
    }];
}

#pragma mark 对话框
- (void)registerShowConfirmResponseBlock:(QN_responseBlock)responseBlock{
    [self registerHandler:QN_showConfirm responseBlock:^(id data) {
        responseBlock(data);
    }];
}

@end
